# 进行重新封装
import json


class ReadJson():

    def __init__(self, path):
        self.path = "D:/Users/learnapitest/pytest-data-json-report/data/" + path

    def read_json(self):
        print("尝试读取 JSON 文件:", self.path)  # 调试路径
        with open(self.path, "r", encoding="utf-8") as f:
            return json.load(f)

# if __name__ == '__main__':

# def get_data():
#     data = ReadJson("userinfo.json").read_json()
#     lst = []
#     print(type(data))
#     # for data in datas.values():
#     lst.append((data.get("url"),
#                 data.get("expect_result"),
#                 data.get("status_code")))
#     return lst
# print(get_data())
